home *** CD-ROM | disk | FTP | other *** search
Text File | 2000-10-06 | 5.6 KB | 206 lines | [TEXT/R*ch] |
- #-----------------------------------------------------------------------
- # Makefile for MPW (Macintosh Programmers Workshop by Apple)
- #
- # Project: SpriteWorldLib
- # File: SpriteWorldLib.make
- #
- # Targets: All (default), Debug, Final
- # Clean (remove objects), Clean-All (remove binaries)
- #
- # Written by Anders F Björklund <afb@algonet.se>
- #-----------------------------------------------------------------------
-
- Makefile = "SpriteWorldLib.make" # high-level make (this file)
- MakeOutput = "SpriteWorldLib.makelow" # low-level make (built by this file)
-
- SpriteWorldLib ƒ All # Default High-Level Target
- All ƒ Debug Final
- Debug ƒ 68K.Debug PPC.Debug
- Final ƒ 68K.Final PPC.Final
- Clean ƒ Clean.Debug Clean.Final
- Clean-All ƒ Clean-All.Debug Clean-All.Final
-
- #----------------------------------------------------
-
- Tgt = #
- Opt = #
- Sym = #
- Dbg = #
- Mbg = #
-
- Common = -f {Makefile}
-
- Debug = -d Tgt=Debug ∂
- -d Opt=off ∂
- -d Sym=on ∂
- -d Dbg=Debug
-
- Final = -d Tgt=Final ∂
- -d Opt=speed ∂
- -d Sym=off ∂
- -d Dbg=
-
- Debug68K = {Common} {Debug} -d Mbg="-mbg on"
- DebugPPC = {Common} {Debug} -d Mbg="-tb on"
- Final68K = {Common} {Final} -d Mbg="-mbg off"
- FinalPPC = {Common} {Final} -d Mbg=""
-
- #----------------------------------------------------
- # The high-level targets
- #----------------------------------------------------
-
- 68K.Debug ƒ $OutOfDate
- Make -d Binary=68K {Debug68K} 68K >{MakeOutput}
- Execute {MakeOutput}
- Delete {MakeOutput}
-
- PPC.Debug ƒ $OutOfDate
- Make -d Binary=PPC {DebugPPC} PPC >{MakeOutput}
- Execute {MakeOutput}
- Delete {MakeOutput}
-
- 68K.Final ƒ $OutOfDate
- Make -d Binary=68K {Final68K} 68K >{MakeOutput}
- Execute {MakeOutput}
- Delete {MakeOutput}
-
- PPC.Final ƒ $OutOfDate
- Make -d Binary=PPC {FinalPPC} PPC >{MakeOutput}
- Execute {MakeOutput}
- Delete {MakeOutput}
-
- Clean.Debug ƒ $OutOfDate
- Make {Common} {Debug} Remove >{MakeOutput}
- Execute {MakeOutput}
- Delete {MakeOutput}
-
- Clean.Final ƒ $OutOfDate
- Make {Common} {Final} Remove >{MakeOutput}
- Execute {MakeOutput}
- Delete {MakeOutput}
-
- Clean-All.Debug ƒ $OutOfDate
- Make {Common} {Debug} Remove-All >{MakeOutput}
- Execute {MakeOutput}
- Delete {MakeOutput}
-
- Clean-All.Final ƒ $OutOfDate
- Make {Common} {Final} Remove-All >{MakeOutput}
- Execute {MakeOutput}
- Delete {MakeOutput}
-
- #-----------------------------------------------------------------------
- # Project Variables
- #-----------------------------------------------------------------------
-
- Objects = :{Dbg}Objects:
-
- Sources = "{SpriteWorld}Sources:"
-
- SWHeaders = "{SpriteWorld}Headers:"
- BPHeaders = "{SpriteWorld}BlitPixie:Headers:"
-
- SWLibs = "{SpriteWorld}Libraries:"
- BPLibs = "{SpriteWorld}BlitPixie:Libraries:"
-
- LibName68K = SpriteWorld{Dbg}Lib.o
- LibNamePPC = SpriteWorld{Dbg}Lib.x
-
- Lib68K = {SWLibs}{LibName68K}
- LibPPC = {SWLibs}{LibNamePPC}
-
- 68K ƒ {Lib68K}
- PPC ƒ {LibPPC}
-
- #-----------------------------------------------------------------------
- # Compiler options
- #-----------------------------------------------------------------------
-
- CC68K = {C} # normally SC
- CCPPC = {PPCC} # normally MrC
- LINK68K = Lib
- LINKPPC = PPCLink
-
- Options =
- Warnings = -proto strict -typecheck strict
- IncludesFolders = -i {SWHeaders} -i {BPHeaders}
-
- CCOptions = {IncludesFolders} {Options} {Warnings} -opt {Opt}
- CCOptions68K = {CCOptions} {Mbg} -model far
- CCOptionsPPC = {CCOptions} {Mbg}
-
- LibOptions = -sym {Sym}
- LibOptions68K = {LibOptions}
- LibOptionsPPC = {LibOptions} -xm l
-
- #------------------------------------------------------------------------------
- # These are the sources that we want to include in the library.
- #-------------------------------------------------------------------------------
-
- Objects68K = ∂
- {Objects}SpriteWorld.c.o ∂
- {Objects}SpriteLayer.c.o ∂
- {Objects}Sprite.c.o ∂
- {Objects}SpriteFrame.c.o ∂
- {Objects}SpriteWorldUtils.c.o ∂
- {Objects}SpriteCompiler.c.o ∂
- {Objects}BlitPixieInterface.c.o ∂
- {Objects}Scrolling.c.o ∂
- {Objects}Tiling.c.o
-
- ObjectsPPC = ∂
- {Objects}SpriteWorld.c.x ∂
- {Objects}SpriteLayer.c.x ∂
- {Objects}Sprite.c.x ∂
- {Objects}SpriteFrame.c.x ∂
- {Objects}SpriteWorldUtils.c.x ∂
- {Objects}SpriteCompiler.c.x ∂
- {Objects}BlitPixieInterface.c.x ∂
- {Objects}Scrolling.c.x ∂
- {Objects}Tiling.c.x
-
- #------------------------------------------------------------------------------
- # These are the library objects that we want to include in the library.
- #-------------------------------------------------------------------------------
-
- Libs68K = ∂
- {BPLibs}BlitPixieLib.o
-
- LibsPPC = ∂
- {BPLibs}BlitPixieLib.x
-
- #-----------------------------------------------------------------------
- # These are modified default build rules.
- #-----------------------------------------------------------------------
-
- {Objects} ƒ {Sources}
-
- .c.o ƒ .c
- Echo "# Compiling {Default}.c using {CC68K} ({Tgt})"
- {CC68K} {CCOptions68K} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
-
- .c.x ƒ .c
- Echo "# Compiling {Default}.c using {CCPPC} ({Tgt})"
- {CCPPC} {CCOptionsPPC} {DepDir}{Default}.c -o {TargDir}{Default}.c.x
-
- #-----------------------------------------------------------------------
- # The low-level output targets.
- #-----------------------------------------------------------------------
-
- {Lib68K} ƒƒ {Objects68K}
- Echo "# Linking 680X0 library {LibName68K}"
- {LINK68K} {LibOptions68K} {Objects68K} {Libs68K} -o {Lib68K}
-
- {LibPPC} ƒƒ {ObjectsPPC}
- Echo "# Linking PowerPC library {LibNamePPC}"
- {LINKPPC} {LibOptionsPPC} {ObjectsPPC} {LibsPPC} -o {LibPPC}
-
- Remove ƒ
- Echo "# Removing {Tgt} objects"
- Delete -i {Objects68K} {ObjectsPPC}
-
- Remove-All ƒ Remove
- Echo "# Removing {Tgt} binaries"
- Delete -i {Lib68K} {LibPPC}
-
-